package com.jl.jlapp.adapter;

import android.support.annotation.Nullable;
import android.view.View;
import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.jl.jlapp.R;
import com.jl.jlapp.eneity.ActivitysAndCouponsByGoodsMsgModel;
import com.jl.jlapp.eneity.ShoppingCartModel;
import com.jl.jlapp.mvp.activity.OrderSubmitActivity;

import java.util.List;

public class OrderChoosGoodsActivityAdapter
        extends BaseQuickAdapter<ActivitysAndCouponsByGoodsMsgModel.ResultDataBean.ActivitysBean, BaseViewHolder> {
    int chooseId = 0;

    public OrderChoosGoodsActivityAdapter(int paramInt, @Nullable List<ActivitysAndCouponsByGoodsMsgModel.ResultDataBean.ActivitysBean> paramList) {
        super(paramInt, paramList);
    }

    protected void convert(BaseViewHolder paramBaseViewHolder, ActivitysAndCouponsByGoodsMsgModel.ResultDataBean.ActivitysBean paramActivitysBean) {
        ImageView ivChoose = (ImageView) paramBaseViewHolder.getView(R.id.is_has_choose);
        ((ImageView) ivChoose).setVisibility(View.GONE);
        if (paramActivitysBean.getActivityInformation().getId() == this.chooseId) {
            ((ImageView) ivChoose).setVisibility(View.VISIBLE);
        }
        paramBaseViewHolder.setText(R.id.activity_information_id, paramActivitysBean.getActivityInformation().getId() + "");
        int i = 0;
//    while (i < OrderSubmitActivity.shouldBuyShoppingCartList.size())
//    {
//      if (paramActivitysBean.getGoodsSpeIdList().size() > 0)
//      {
//        int j = 0;
//        localObject2 = localObject1;
//        if (j < paramActivitysBean.getGoodsSpeIdList().size())
//        {
//          localObject2 = localObject1;
//          if (((ShoppingCartModel.ResultDataBean)OrderSubmitActivity.shouldBuyShoppingCartList.get(i)).getGoodsSpecificationDetailsId() == ((Integer)paramActivitysBean.getGoodsSpeIdList().get(j)).intValue()) {
//            if (j != 0) {
//            }
//          }
//
//        }
//      }
//      i += 1;
////      localObject1 = localObject2;
//    }

        String localObject1 = paramActivitysBean.getActivityInformation().getName();
        switch (paramActivitysBean.getActivityInformation().getActivityType()) {

            case 0:
                paramBaseViewHolder.setText(R.id.shop_cart_activity_type, "折扣");
                paramBaseViewHolder.setText(R.id.activity_name, (String) localObject1 + "打 " + paramActivitysBean.getActivityInformation().getDiscount() * 10.0D + " 折，最多可购买" + paramActivitysBean.getActivityInformation().getMaxNum() + "个");
                return;
            case 1:
                paramBaseViewHolder.setText(R.id.shop_cart_activity_type, "团购");
                paramBaseViewHolder.setText(R.id.activity_name, (String) localObject1 + "团购单价为¥" + paramActivitysBean.getActivityInformation().getDiscount() + "，最多可购买" + paramActivitysBean.getActivityInformation().getMaxNum() + "个");
                return;
            case 2:
                paramBaseViewHolder.setText(R.id.shop_cart_activity_type, "秒杀");
                paramBaseViewHolder.setText(R.id.activity_name, (String) localObject1 + "秒杀单价为¥" + paramActivitysBean.getActivityInformation().getDiscount() + "，最多可购买" + paramActivitysBean.getActivityInformation().getMaxNum() + "个");
                return;
            case 3:
                paramBaseViewHolder.setText(R.id.shop_cart_activity_type, "立减");
                paramBaseViewHolder.setText(R.id.activity_name, (String) localObject1 + "购买可立减¥" + paramActivitysBean.getActivityInformation().getDiscount() + "，最多可购买" + paramActivitysBean.getActivityInformation().getMaxNum() + "个");
                return;

            default:
                paramBaseViewHolder.setText(R.id.shop_cart_activity_type, "满减");
                paramBaseViewHolder.setText(R.id.activity_name, (String) localObject1 + "满¥" + paramActivitysBean.getActivityInformation().getPrice() + "，可减¥" + paramActivitysBean.getActivityInformation().getDiscount());

                return;

        }
    }

    public void setChooseId(int paramInt) {
        this.chooseId = paramInt;
    }
}


/* Location:              /Users/davidzhang/Documents/decompileApk/jlfood-dex2jar.jar!/com/jl/jlapp/adapter/OrderChoosGoodsActivityAdapter.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */